﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace Kooboo.Commerce
{
    public partial interface ICustomer : IVistor
    {
        int Id
        {
            get;
            set;
        }

        int SavingPoint
        {
            get;
            set;
        }

        [Required]
        [StringLength(50)]
        [RegularExpression(@"^[a-zA-Z]+([a-zA-Z0-9]*[\._]?[a-zA-Z0-9]+)?$", ErrorMessage = "Please enter a valid username.")]
        string UserName
        {
            get;
            set;
        }

        DateTime CreateDate
        {
            get;
            set;
        }

        int StarLevel
        {
            get;
            set;
        }

        IAddress DefaultAddress
        {
            get;
            set;
        }

        IQueryable<IAddress> Addresses
        {
            get;
        }

        IQueryable<IOrder> Orders
        {
            get;
        }

        IQueryable<ISupportTicket> SupportTickets
        {
            get;
        }

        [Required]
        [StringLength(50)]
        [RegularExpression(@"\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*",ErrorMessage="Please enter a correct email address.")]
        string MailAddress
        {
            get;
            set;
        }

        [Required]
        [StringLength(20)]
        string FirstName
        {
            get;
            set;
        }

        [Required]
        [StringLength(20)]
        string MiddleName
        {
            get;
            set;
        }

        [Required]
        [StringLength(20)]
        string LastName
        {
            get;
            set;
        }

        int Gender
        {
            get;
            set;
        }

        DateTime? Birthday
        {
            get;
            set;
        }

        [StringLength(50)]
        ICountry Country
        {
            get;
            set;
        }

        [StringLength(50)]
        string City
        {
            get;
            set;
        }

        [StringLength(50)]
        string Telphone
        {
            get;
            set;
        }

        [StringLength(50)]
        string Mobile
        {
            get;
            set;
        }
    }
}
